package org.jprogger.myworld.api.response;

/**
 * 
 * @author jprogger
 *
 * @param <T>
 */
public class DefaultApiResponse<T> implements ApiResponse<T> {

	private ApiResponseError error;
	private ApiResponseData<T> data;
	
	@Override
	public boolean hasError() {
		return error != null;
	}
	
	@Override
	public ApiResponseError getError() {
		return error;
	}
	
	@Override
	public void setError(ApiResponseError error) {
		this.error = error;
	}
	
	@Override
	public ApiResponseData<T> getResponseData() {
		return data;
	}
	
	@Override
	public void setResponseData(ApiResponseData<T> data) {
		this.data = data;
	}
}
